package com.leather.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leather.admin.entity.Permission;
import com.leather.admin.entity.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author kevin
 */
public interface RoleMapper extends BaseMapper<Role> {


    @Select("select a.* from permission a,role_permission b where a.id = b.permission_id  and b.role_id = #{roleId} ")
    List<Permission> getRolePermissions(@Param("roleId") int roleId);

}